from wagtail.api.v2.views import PagesAPIViewSet
from .models import BlogPage
from .serializers import BlogPageSerializer


class BlogPagesAPIViewSet(PagesAPIViewSet):
    base_serializer_class = BlogPageSerializer

    def get_queryset(self):
        return BlogPage.objects.live().public()
